package com.yohann.eduservice.client;

import com.yohann.commonutils.result.R;
import com.yohann.eduservice.client.impl.VodClientImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * <p>
 * feign接口
 * </p>
 *
 * @author Yohann
 * @since 2020/8/11
 */
@FeignClient(name = "vod-service", fallback = VodClientImpl.class)
@Component
public interface VodClient {
    /**
     * 删除阿里云中的视频
     * @param id
     * @return
     */
    @DeleteMapping("/vod-service/video/delete/{id}")
    R deleteVideo(@PathVariable("id") String id);

    /**
     * 批量删除视频
     * @param videoIdList
     * @return
     */
    @DeleteMapping("/vod-service/video/delete-batch")
    R deleteBatch(@RequestParam("videoIdList") List<String> videoIdList);
}
